Skip to content

Compiler: fix typo in can_propagate_conditional#60902

Merged
Keno merged 1 commit intomasterfrom
kf/60883
Feb 2, 2026
Merged

Compiler: fix typo in can_propagate_conditional#60902
Keno merged 1 commit intomasterfrom
kf/60883

Conversation

@Keno
Copy link
Member

@Keno Keno commented Feb 2, 2026

The function was checking rt.thentype twice instead of checking both rt.thentype and rt.elsetype. This caused incorrect type narrowing when conditional types were propagated through wrapper functions.

Fixes #60883. Completely done by Claude.

The function was checking `rt.thentype` twice instead of checking both
`rt.thentype` and `rt.elsetype`. This caused incorrect type narrowing
when conditional types were propagated through wrapper functions.

Fixes #60883

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Keno Keno added bugfix This change fixes an existing bug compiler:inference Type inference backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 labels Feb 2, 2026
@Keno Keno merged commit 922aa53 into master Feb 2, 2026
13 checks passed
@Keno Keno deleted the kf/60883 branch February 2, 2026 12:32
@KristofferC KristofferC mentioned this pull request Feb 4, 2026
56 tasks
KristofferC pushed a commit that referenced this pull request Feb 4, 2026
The function was checking `rt.thentype` twice instead of checking both
`rt.thentype` and `rt.elsetype`. This caused incorrect type narrowing
when conditional types were propagated through wrapper functions.

Fixes #60883. Completely done by Claude.

Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 922aa53)
@KristofferC KristofferC mentioned this pull request Feb 25, 2026
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.12 Change should be backported to release-1.12 backport 1.13 Change should be backported to release-1.13 bugfix This change fixes an existing bug compiler:inference Type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apparent mutation within kwarg function

1 participant